var qr = require('qr-image');

module.exports = {
    get: {
        image: function (req, res) {
            var img = qr.image(decodeURIComponent(req.query.code), {
                size: 10
            });
            res.contentType = "image/png";
            img.pipe(res);
        }
    }
};